# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
include common.mk

CPPFLAGS += -I$(SRC)/include -I$(SRC)/src/aosp -I$(SRC)/src/aosp/compability -std=c++11 -Wno-deprecated -Wno-error=sign-compare -D FLAG_DEBUG

SUGGEST_OBJ_FILES=src/suggest.o

SUGGEST_DEMO_OBJ_FILES=src/demo.o

CXX_LIBRARY(src/libsuggest.so): $(SUGGEST_OBJ_FILES)

CXX_BINARY(src/demo): LDFLAGS += -lncurses -Lsrc -lsuggest
CXX_BINARY(src/demo): $(SUGGEST_DEMO_OBJ_FILES) CXX_LIBRARY(src/libsuggest.so)

install-lib: CXX_LIBRARY(src/libsuggest.so)
	install -D -m 0755 src/libsuggest.so $(DESTDIR)$(LIBDIR)/libsuggest.so
